package com.young.config.model;

import com.young.common.core.excel.ExcelColumn;
import com.young.interfaces.config.model.ConfigDTO;

import java.util.Date;

/**
 * 统一配置信息实体类
 * Created by wangjiyu on 2021-6-20.
 */
public class ConfigKv {

    @ExcelColumn(value = "自增主键", order = 1)
    private Long id;//自增主键
    @ExcelColumn(value = "配置key", order = 2)
    private String configKey;//配置key
    @ExcelColumn(value = "配置内容", order = 3)
    private String configValue;//配置内容
    @ExcelColumn(value = "分组", order = 4)
    private String configGroup;//分组
    @ExcelColumn(value = "配置类型", order = 5)
    private Integer configType;//配置类型
    @ExcelColumn(value = "配置内容的class类型", order = 6)
    private String configClass;//配置内容的class类型
    @ExcelColumn(value = "优先级,1:高,2:低", order = 7)
    private Integer priority;//优先级,1:高,2:低
    @ExcelColumn(value = "备注", order = 7)
    private String remark;//备注
    @ExcelColumn(value = "显示顺序", order = 8)
    private Integer num;//显示顺序
    @ExcelColumn(value = "状态,1启用,2禁用", order = 9)
    private Integer state;//状态,1启用,2禁用
    @ExcelColumn(value = "创建时间", order = 10)
    private Date createTime;//创建时间
    private Date createTime2;//创建时间,按时间检索时作为结束时间使用
    @ExcelColumn(value = "创建人", order = 11)
    private String createUserId;//创建人
    @ExcelColumn(value = "修改时间", order = 12)
    private Date updateTime;//修改时间
    private Date updateTime2;//修改时间,按时间检索时作为结束时间使用
    @ExcelColumn(value = "修改人", order = 13)
    private String updateUserId;//修改人

    private String orderBy;//排序字段
    private String orderType;//排序类型,升序asc/降序desc

    public ConfigKv() {
        super();
    }

    /**
     * 转为配置传输对象
     *
     * @return
     */
    public ConfigDTO toConfigDTO() {
        ConfigDTO config = new ConfigDTO();
        config.setKey(this.configKey);
        config.setValue(this.configValue);
        config.setPriority(this.priority);
        return config;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getConfigKey() {
        return configKey;
    }

    public void setConfigKey(String configKey) {
        this.configKey = configKey;
    }

    public String getConfigValue() {
        return configValue;
    }

    public void setConfigValue(String configValue) {
        this.configValue = configValue;
    }

    public String getConfigGroup() {
        return configGroup;
    }

    public void setConfigGroup(String configGroup) {
        this.configGroup = configGroup;
    }

    public Integer getConfigType() {
        return configType;
    }

    public void setConfigType(Integer configType) {
        this.configType = configType;
    }

    public String getConfigClass() {
        return configClass;
    }

    public void setConfigClass(String configClass) {
        this.configClass = configClass;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime2() {
        return createTime2;
    }

    public void setCreateTime2(Date createTime2) {
        this.createTime2 = createTime2;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime2() {
        return updateTime2;
    }

    public void setUpdateTime2(Date updateTime2) {
        this.updateTime2 = updateTime2;
    }

    public String getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(String updateUserId) {
        this.updateUserId = updateUserId;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }
}